package org.example.循环;

import java.util.ArrayList;
import java.util.Iterator;

public class ForRemoveDecomTest
{

    public ForRemoveDecomTest()
    {
    }

    public static void main(String args[])
    {
        ArrayList arraylist = new ArrayList() {


            {
                add("Hollis");
                add("hollis");
                add("HollisChuang");
                add("H");
            }
        };
        Iterator iterator = arraylist.iterator();
        do
        {
            if(!iterator.hasNext())
                break;
            String s = (String)iterator.next();
            if(s.equals("Hollis"))
                arraylist.remove(s);
        } while(true);
        System.out.println(arraylist);
    }
}
